package com.vma.jifu.controller;

import com.jfinal.core.Controller;
import com.vma.jifu.offer.service.OfferService;
import com.vma.jifu.offer.service.impl.OfferServiceImpl;
import com.vma.tools.ReturnsUtil;

/**
 * Created by chenzui on 2017/6/15.
 */
public class OfferCommentController extends BaseController {
    private OfferService offerService = new OfferServiceImpl();

    public void qyrCommentList(){
        Integer cPage = getParaToInt("cPage");
        Integer pSize = getParaToInt("pSize");
        Integer offerId = getParaToInt("offerId");
        renderRes(offerService.qyrCommentList(cPage,pSize,offerId));
    }

    public void submitOfferComment(){
        Integer userId = getParaToInt("userId");
        Integer offerId = getParaToInt("offerId");
        Integer orderId = getParaToInt("orderId");
        String content = getPara("content");
        offerService.submitOfferComment(userId,offerId,orderId,content);
        renderRes("success");
    }
}
